"use strict";
class Personchild {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }
    speak(n) {
        for (let i = 0; i < n; i++) {
            console.log(`我的名字${this.name},今年${this.age}`);
        }
    }
}
const pc = new Personchild("张三", 18);
pc.speak(3); //我的名字张三,今年18 ---循环打印3次
